﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace BYRForum.Binding.Article
{
    public class ArticleList
    {
        public ArticleList()
        {
            this.Items = new ObservableCollection<ArticleItem>();
        }
        public ObservableCollection<ArticleItem> Items { get; private set; }

        public void LoadData(BYRBBS.Model.ArticleItem[] alist)
        {
            Items.Clear();
            for (int i = 0; i < alist.Length; i++)
            {
                this.Items.Add(new ArticleItem()
                {
                    Article_Item=alist[i]
                });
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
